//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#pragma once

#include <d2d1.h>

#include "CanvasGradient.h"

class LinearGradientBrush {
public:
	LinearGradientBrush(ID2D1RenderTarget* renderTarget);
	~LinearGradientBrush(void);

public:
	void SetCanvasGradient(CanvasGradient canvasGradient);
	ID2D1LinearGradientBrush* GetGradientBrush();

private:
	void InitializeBrush();
	void RefreshBrush();

	ID2D1RenderTarget* _renderTarget;
	ID2D1LinearGradientBrush* _linearGradientBrush;

private:
	CanvasGradient _canvasGradient; //GradientData (Changeable)

};